
<template>
	<view>
		<u-navbar
		    title="候选人"
			rightText="确定"
			placeholder="true"
		    @rightClick="into"
			@leftClick="leftClick"
		    :autoBack="true"
		>
		</u-navbar>
		<u-subsection :list="items" :current="current" @change="sectionChange"></u-subsection>
		<view class="content">
			<view v-show="current == 0" >
				<view class="goods" v-for="(item,index) in data" :key="index" @click="toShow(item.rid,item.status)" v-if="item.status == 1">
				<view class="goods-left">
					<u-avatar src="/static/img/tabbar/addactive.png" size="100"></u-avatar>
				</view>
				<view class="goods-right" style="width: 280px;height: 100px;">
					<view class="txt-line2"><h3>{{item.rname}}</h3></view>
					<div  class="zt" style="width: 80px;">
						<button style="background-color : #fffaed;color: #fffaed;height: 
						40px;width:60px;
						font-size:10px;
						font-style: 'margin-left:10rpx;'"
						>待核</button>
						
					</div>
					<div class="ztt"><font  size="3">待初筛</font></div>
					<view class="txt">
						<view style="width: 280px;">
							<view class="txt"><font  size="3">28岁｜</font></view>
							<view class="txt"><font  size="3">{{item.experience.education}}｜</font></view>
							<view class="txt"><font  size="3">{{item.work.workhours}}经验｜</font></view>
							<view class="txt"><font  size="3">{{item.work.severance}}k以上</font></view>
							<view class="txt"><font size="3">{{item.work.corporate}}｜</font></view>
							<view class="txt"><font size="3">{{item.work.position}}｜</font></view>
							<view class="txt"><font size="3">2015年—至今</font></view>
						</view>
					</view>
				</view>
				</view>
			</view>
			<view v-show="current == 1">
				<view class="goods" v-for="(item,index) in data" :key="index" @click="toShow(item.rid,item.status)" v-if="item.status == 2">
				<view class="goods-left">
					<u-avatar src="/static/img/tabbar/addactive.png" size="100"></u-avatar>
				</view>
				<view class="goods-right" style="width: 280px;height: 100px;">
					<view class="txt-line2"><h3>{{item.rname}}</h3></view>
					<div  class="zt" style="width: 80px;">
						<button style="background-color : #fffaed;color: #fffaed;height: 
						40px;width:60px;
						font-size:10px;
						font-style: 'margin-left:10rpx;'"
						>待核</button>
						
					</div>
					<div class="ztt"><font  size="3">待面试</font></div>
					<view class="txt">
						<view style="width: 280px;">
						<view class="txt"><font  size="3">28岁｜</font></view>
						<view class="txt"><font  size="3">{{item.experience.education}}｜</font></view>
						<view class="txt"><font  size="3">{{item.work.workhours}}经验｜</font></view>
						<view class="txt"><font  size="3">{{item.work.severance}}k以上</font></view>
						<view class="txt"><font size="3">{{item.work.corporate}}｜</font></view>
						<view class="txt"><font size="3">{{item.work.position}}｜</font></view>
						<view class="txt"><font size="3">2015年—至今</font></view>
						</view>
					</view>
				</view>
				</view>
			</view>
			<view v-show="current == 2">
				<view class="goods" v-for="(item,index) in data" :key="index" @click="toShow(item.rid,item.status)" v-if="item.status == 3">
				<view class="goods-left">
					<u-avatar src="/static/img/tabbar/addactive.png" size="100"></u-avatar>
				</view>
				<view class="goods-right" style="width: 280px;height: 100px;">
					<view class="txt-line2"><h3>{{item.rname}}</h3></view>
					<div  class="zt" style="width: 80px;">
						<button style="background-color : #fffaed;color: #fffaed;height: 
						40px;width:60px;
						font-size:10px;
						font-style: 'margin-left:10rpx;'"
						>待核</button>
						
					</div>
					<div class="ztt"><font  size="3">待录用</font></div>
					<view class="txt">
						<view style="width: 280px;">
							<view class="txt"><font  size="3">28岁｜</font></view>
							<view class="txt"><font  size="3">{{item.experience.education}}｜</font></view>
							<view class="txt"><font  size="3">{{item.work.workhours}}经验｜</font></view>
							<view class="txt"><font  size="3">{{item.work.severance}}k以上</font></view>
							<view class="txt"><font size="3">{{item.work.corporate}}｜</font></view>
							<view class="txt"><font size="3">{{item.work.position}}｜</font></view>
							<view class="txt"><font size="3">2015年—至今</font></view>
						</view>
					</view>
				</view>
				</view>
			</view>
			<view v-show="current == 3">
				<view class="goods" v-for="(item,index) in data" :key="index" @click="toShow(item.rid,item.status)" v-if="item.status == 4">
				<view class="goods-left">
					<u-avatar src="/static/img/tabbar/addactive.png" size="100"></u-avatar>
				</view>
				<view class="goods-right" style="width: 280px;height: 100px;">
					<view class="txt-line2"><h3>{{item.rname}}</h3></view>
					<div  class="zt" style="width: 80px;">
						<button style="background-color : #fffaed;color: #fffaed;height: 
						40px;width:60px;
						font-size:10px;
						font-style: 'margin-left:10rpx;'"
						>待核</button>
						
					</div>
					<div class="ztt"><font  size="3">已入职</font></div>
					<view class="txt">
						<view style="width: 280px;">
							<view class="txt"><font  size="3">28岁｜</font></view>
							<view class="txt"><font  size="3">{{item.experience.education}}｜</font></view>
							<view class="txt"><font  size="3">{{item.work.workhours}}经验｜</font></view>
							<view class="txt"><font  size="3">{{item.work.severance}}k以上</font></view>
							<view class="txt"><font size="3">{{item.work.corporate}}｜</font></view>
							<view class="txt"><font size="3">{{item.work.position}}｜</font></view>
							<view class="txt"><font size="3">2015年—至今</font></view>
						</view>
					</view>
				</view>
				</view>
			</view>
			<view v-show="current == 4" >
				<view class="goods" v-for="(item,index) in data" :key="index" @click="toShow(item.rid,item.status)" v-if="item.status == 5">
				<view class="goods-left">
					<u-avatar src="/static/img/tabbar/addactive.png" size="100"></u-avatar>
				</view>
				<view class="goods-right" style="width: 280px;height: 100px;">
					<view class="txt-line2"><h3>{{item.rname}}</h3></view>
					<div  class="zt" style="width: 80px;">
						<button style="background-color : #fffaed;color: #fffaed;height: 
						40px;width:60px;
						font-size:10px;
						font-style: 'margin-left:10rpx;'"
						>淘汰</button>
						
					</div>
					<div class="ztt"><font  size="3">淘汰</font></div>
					<view class="txt">
						<view style="width: 280px;">
							<view class="txt"><font  size="3">28岁｜</font></view>
							<view class="txt"><font  size="3">{{item.experience.education}}｜</font></view>
							<view class="txt"><font  size="3">{{item.work.workhours}}经验｜</font></view>
							<view class="txt"><font  size="3">{{item.work.severance}}k以上</font></view>
							<view class="txt"><font size="3">{{item.work.corporate}}｜</font></view>
							<view class="txt"><font size="3">{{item.work.position}}｜</font></view>
							<view class="txt"><font size="3">2015年—至今</font></view>
						</view>
					</view>
				</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniSegametedCintrol from"@/uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue"
	export default {
		components:{
			uniSegametedCintrol
		},
		data() {
			return {
				data:{},
                items: ['初筛', '面试', '录用', '入职', '淘汰'],
				current: 0,
			}
		},
		onLoad(){
			this.findAll();
		},
		methods:{
			sectionChange(index) {
						if (this.current !== index) {
							  this.current = index;
						 }
						},
			findAll(){
				console.log("1111111"),
				this.$request({
					url: 'entry/jianli/findAll',
					data: {
					},
					method: 'GET',
					success: (res) => {
						console.log(res.data)
						this.data = res.data
					}
				})
			},
			test(){
				console.log('this ia test')
			},
			//点击跳转
			toShow(rid,status){
				uni.navigateTo({
					url:'./jianli?rid='+rid+"&status="+status
				})
				
			},
			into(){
				uni.navigateTo({
					url:'./tian'
				})
			},
			leftClick() {
			    uni.navigateTo({
			    	url:'./../../index/index'
			    })
			        }
			
		}
	}
</script>
<style>
	.txt{
		margin-left:10rpx;
		margin-top: 20rpx;
		float:left;
	}
	.zt{
		margin-top: -48rpx;
		margin-left:180rpx;
		position:relative;
		z-index: index auto;
		
	}
	.txt-line2{
		margin-top: 20rpx;
		margin-left:10rpx;
	}
	.ztt{
		margin-top: -45rpx;
		margin-left:210rpx;
		position:relative;
		z-index: 50;
		color: #ffd67a;
		font-family:cursive;
		font-weight:bold;
	}
	.goods-left {
		margin-top: 20rpx;
		margin-right: 20rpx;
		
	}
	
	.goods-right {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.goods {
		background-color: #fff;
		padding: 30rpx;
		padding-bottom: 20rpx;
		display: flex;
		height: 140px;
	}
</style>